//
//  CalendarView.h
//  RNCalendarViewManager
//
//  Created by DJ on 2019/4/10.
//  Copyright © 2019 DJ. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>
#import <EventKit/EventKit.h>
#import "FSCalendar.h"
#import "LunarFormatter.h"

@class CalendarView;

/**
 选中日期后要实现的代理方法
 dateDic:选中的日期地点
 calendarView：日历
 */
@protocol DateSelectedDelegate <NSObject>

-(void)dateSelect:(NSMutableDictionary *_Nonnull)dateDic calendarView:(CalendarView *)calendarView;

-(void)changeCalendarHeight:(NSDictionary *_Nonnull)dateDic calendarView:(CalendarView *)calendarView;

@end

NS_ASSUME_NONNULL_BEGIN

@interface CalendarView : UIView<FSCalendarDataSource,FSCalendarDelegate,UIGestureRecognizerDelegate,FSCalendarDelegateAppearance>

/**格式化日期*/
@property (strong, nonatomic) NSDateFormatter *dateFormatter;
/**滑动手势*/
@property (strong, nonatomic) UIPanGestureRecognizer *scopeGesture;
/**日历*/
@property (strong, nonatomic) FSCalendar *calendar;
/**选中日期回调*/
@property (copy, nonatomic) RCTBubblingEventBlock onClickDate;
/**改变高度*/
@property (nonatomic, copy) RCTBubblingEventBlock onChangeCalendarHeight;
/**代理*/
@property (nonatomic, weak) id<DateSelectedDelegate> delegate;
/**阴历格式化*/
@property (strong, nonatomic) LunarFormatter *lunarFormatter;
/**阴历日历*/
@property (strong, nonatomic) NSCalendar *lunarCalendar;
/**选择时间数组*/
@property (strong, nonatomic) NSMutableArray *selectedDateArray;
/**用于日历切换*/
@property (strong, nonatomic) NSCalendar *gregorian;
/**上个月*/
-(void)jumpToLastMonth;
/**回到今天*/
-(void)backToToday;
/**跳转到指定日期*/
-(void)jumpToSpecifiedDate:(NSString *)dateString;
/**下个月*/
-(void)jumpToNextMonth;
/**周显示*/
-(void)showWeek;
/**月显示*/
-(void)showMonth;

@end

NS_ASSUME_NONNULL_END
